#ifndef CLIENT_H
#define CLIENT_H

#include <QWidget>
#include <QTcpSocket>
#include <stdshared.h>
#include <QJsonObject>
class Client : public QWidget
{
    Q_OBJECT
public:
    explicit Client(QWidget *parent = nullptr);
    void sendposition(int row,int col,Role role);
    void recvpositon();
    void conserver(const QString &ip,int port);
    QJsonObject returnjsonobj();
signals:

public slots:
    void handleReadyRead();
private:
    QTcpSocket client;
    QJsonObject m_jsonObj;
};

#endif // CLIENT_H
